﻿using System;

namespace GianosNET.Common.Classes
{
    public class Counter
    {
        public string ServiceName { get; private set; }
        public string InstanceName { get; private set; }

        public int? LastCounter { get; set; }
        public DateTime? LastDate { get; set; }
        public string LastString { get; set; }

        public Counter(string serviceName, string instanceName, int? lastCounter = null, DateTime? lastDate = null,
            string lastString = null)
        {
            ServiceName = serviceName;
            InstanceName = instanceName;
            LastCounter = lastCounter;
            LastDate = lastDate;
            LastString = lastString;
        }

        public bool IsEmpty
        {
            get { return !(LastCounter.HasValue || LastDate.HasValue || LastString != null); }
        }
    }
}
